using INTEX.DataBase;
using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Data;
using System.Collections.Generic;
namespace WPFExcelReport
{
    public partial class VWBFKOPF
    {
        public VWBBST VWBB
        {
            get
            {
                if (!ENVMAIN.ContainsKey("VWBB"))
                {
                    ENVMAIN["VWBB"] = new VWBBST();
                }
                return (VWBBST)ENVMAIN["VWBB"];
            }
        }
        public DataRow NEWWBFK(Dictionary<string, object> pm)
        {
            dwData = TBMain.NewRow();
            SetUpNewRow(ref dwData);
            dwData["WBFKMANDANT"] = app.Mandant;
            dwData["WBFKRWKRS"] = pm["RWKRS"];
            dwData["WBFKRWLFD"] = pm["RWLFD"];
            dwData["WBFKRWPOS"] = pm["RWPOS"];
            dwData["WBFKVERSION"] = pm["ERVER"]; 
            dwData["WBFKNEUBEN"] = pm["USER"];
            dwData["WBFKNEUDAT"] = pm["DATE"];
            TBMain.Rows.InsertAt(dwData, 0);
            InsertWBFKOPF(dwData);
            DataRow dwR = TBMain.Clone().Rows.Add();
            dwR.ItemArray = dwData.ItemArray;
            return dwR;
        }
        public DataSet LOADERWBFK(Dictionary<string, object> pm)
        {
            dwData = TBMain.NewRow();
            dwData["WBFKMANDANT"] = app.Mandant;
            dwData["WBFKRWKRS"] = pm["RWKRS"];
            dwData["WBFKRWLFD"] = pm["RWLFD"];
            dwData["WBFKRWPOS"] = pm["RWPOS"];
            SResult = QWBFK02(dwData);

            return SResult;
        }

        public DataSet LOADERVER(Dictionary<string, object> pm)
        {
            dwData = TBMain.NewRow();
            dwData["WBFKMANDANT"] = app.Mandant;
            dwData["WBFKRWKRS"] = pm["RWKRS"];
            dwData["WBFKRWLFD"] = pm["RWLFD"];
            dwData["WBFKRWPOS"] = pm["RWPOS"];
            dwData["WBFKVERSION"] = pm["ERVER"];
            SResult = QWBFK01(dwData);
            return SResult;
        }
        public DataSet GETERVER(Dictionary<string, object> pm)
        {
            dwData = TBMain.NewRow();
            dwData["WBFKMANDANT"] = app.Mandant;
            dwData["WBFKRWKRS"] = pm["RWKRS"];
            dwData["WBFKRWLFD"] = pm["RWLFD"];
            dwData["WBFKRWPOS"] = pm["RWPOS"];
            SResult = QWBFK03(dwData);
            return SResult;
        }
        public void RVDEFAULT(Dictionary<string, object> pm)
        {
            dwData = TBMain.NewRow();
            dwData["WBFKMANDANT"] = app.Mandant;
            dwData["WBFKRWKRS"] = pm["RWKRS"];
            dwData["WBFKRWLFD"] = pm["RWLFD"];
            dwData["WBFKRWPOS"] = pm["RWPOS"];
            dwData["WBFKVERSION"] = pm["ERVER"];

            DWBFK01(dwData);
        }
    }
    public partial class VWBFKOPF
    {

        public string WBFKMANDANT { get { if (dwMaster == null) return ""; return dwMaster["WBFKMANDANT"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKMANDANT"] = value; OnPropertyChanged("WBFKMANDANT", value); } } //lENGth 2
        public string WBFKRWKRS { get { if (dwMaster == null) return ""; return dwMaster["WBFKRWKRS"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKRWKRS"] = value; OnPropertyChanged("WBFKRWKRS", value); } } //lENGth 2
        public string WBFKRWLFD { get { if (dwMaster == null) return ""; return dwMaster["WBFKRWLFD"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKRWLFD"] = value; OnPropertyChanged("WBFKRWLFD", value); } } //lENGth 6
        public string WBFKRWPOS { get { if (dwMaster == null) return ""; return dwMaster["WBFKRWPOS"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKRWPOS"] = value; OnPropertyChanged("WBFKRWPOS", value); } } //lENGth 4
        public string WBFKVERSION { get { if (dwMaster == null) return ""; return dwMaster["WBFKVERSION"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKVERSION"] = value; OnPropertyChanged("WBFKVERSION", value); } } //lENGth 1
        public double WBFKAENDZL { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WBFKAENDZL"].ToString()); } set { if (dwMaster == null) return; dwMaster["WBFKAENDZL"] = value; OnPropertyChanged("WBFKAENDZL", value); } } //lENGth 0
        public string WBFKAENDBEN { get { if (dwMaster == null) return ""; return dwMaster["WBFKAENDBEN"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKAENDBEN"] = value; OnPropertyChanged("WBFKAENDBEN", value); } } //lENGth 8
        public double WBFKAENDDAT { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WBFKAENDDAT"].ToString()); } set { if (dwMaster == null) return; dwMaster["WBFKAENDDAT"] = value; OnPropertyChanged("WBFKAENDDAT", value); } } //lENGth 0
        public string WBFKNEUBEN { get { if (dwMaster == null) return ""; return dwMaster["WBFKNEUBEN"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKNEUBEN"] = value; OnPropertyChanged("WBFKNEUBEN", value); } } //lENGth 8
        public double WBFKNEUDAT { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WBFKNEUDAT"].ToString()); } set { if (dwMaster == null) return; dwMaster["WBFKNEUDAT"] = value; OnPropertyChanged("WBFKNEUDAT", value); } } //lENGth 0
        public string WBFKSART { get { if (dwMaster == null) return ""; return dwMaster["WBFKSART"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKSART"] = value; OnPropertyChanged("WBFKSART", value); } } //lENGth 1
        public string WBFKSSEITE { get { if (dwMaster == null) return ""; return dwMaster["WBFKSSEITE"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKSSEITE"] = value; OnPropertyChanged("WBFKSSEITE", value); } } //lENGth 1
        public string WBFKSRICHT { get { if (dwMaster == null) return ""; return dwMaster["WBFKSRICHT"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKSRICHT"] = value; OnPropertyChanged("WBFKSRICHT", value); } } //lENGth 1
        public string WBFKSLAEKZ { get { if (dwMaster == null) return ""; return dwMaster["WBFKSLAEKZ"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKSLAEKZ"] = value; OnPropertyChanged("WBFKSLAEKZ", value); } } //lENGth 1
        public string WBFKWARSCH { get { if (dwMaster == null) return ""; return dwMaster["WBFKWARSCH"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKWARSCH"] = value; OnPropertyChanged("WBFKWARSCH", value); } } //lENGth 8
        public string WBFKWMNRKRS { get { if (dwMaster == null) return ""; return dwMaster["WBFKWMNRKRS"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKWMNRKRS"] = value; OnPropertyChanged("WBFKWMNRKRS", value); } } //lENGth 2
        public string WBFKWMLFDNR { get { if (dwMaster == null) return ""; return dwMaster["WBFKWMLFDNR"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKWMLFDNR"] = value; OnPropertyChanged("WBFKWMLFDNR", value); } } //lENGth 4
        public string WBFKWMPOS { get { if (dwMaster == null) return ""; return dwMaster["WBFKWMPOS"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKWMPOS"] = value; OnPropertyChanged("WBFKWMPOS", value); } } //lENGth 2
        public double WBFKLFPOS { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WBFKLFPOS"].ToString()); } set { if (dwMaster == null) return; dwMaster["WBFKLFPOS"] = value; OnPropertyChanged("WBFKLFPOS", value); } } //lENGth 0
        public double WBFKISTKLG { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WBFKISTKLG"].ToString()); } set { if (dwMaster == null) return; dwMaster["WBFKISTKLG"] = value; OnPropertyChanged("WBFKISTKLG", value); } } //lENGth 0
        public double WBFKIGEW { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WBFKIGEW"].ToString()); } set { if (dwMaster == null) return; dwMaster["WBFKIGEW"] = value; OnPropertyChanged("WBFKIGEW", value); } } //lENGth 0
        public double WBFKIBRT { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WBFKIBRT"].ToString()); } set { if (dwMaster == null) return; dwMaster["WBFKIBRT"] = value; OnPropertyChanged("WBFKIBRT", value); } } //lENGth 0
        public string WBFKENDEVERS { get { if (dwMaster == null) return ""; return dwMaster["WBFKENDEVERS"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKENDEVERS"] = value; OnPropertyChanged("WBFKENDEVERS", value); } } //lENGth 1
        public string WBFKAUFKRS { get { if (dwMaster == null) return ""; return dwMaster["WBFKAUFKRS"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKAUFKRS"] = value; OnPropertyChanged("WBFKAUFKRS", value); } } //lENGth 2
        public string WBFKAUFLFD { get { if (dwMaster == null) return ""; return dwMaster["WBFKAUFLFD"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKAUFLFD"] = value; OnPropertyChanged("WBFKAUFLFD", value); } } //lENGth 6
        public string WBFKAUFPOS { get { if (dwMaster == null) return ""; return dwMaster["WBFKAUFPOS"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKAUFPOS"] = value; OnPropertyChanged("WBFKAUFPOS", value); } } //lENGth 3
        public string WBFKAFOLGE { get { if (dwMaster == null) return ""; return dwMaster["WBFKAFOLGE"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKAFOLGE"] = value; OnPropertyChanged("WBFKAFOLGE", value); } } //lENGth 3
        public string WBFKAUFMPOS { get { if (dwMaster == null) return ""; return dwMaster["WBFKAUFMPOS"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKAUFMPOS"] = value; OnPropertyChanged("WBFKAUFMPOS", value); } } //lENGth 4
        public double WBFKUSTKLG { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WBFKUSTKLG"].ToString()); } set { if (dwMaster == null) return; dwMaster["WBFKUSTKLG"] = value; OnPropertyChanged("WBFKUSTKLG", value); } } //lENGth 0
        public double WBFKUGEW { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WBFKUGEW"].ToString()); } set { if (dwMaster == null) return; dwMaster["WBFKUGEW"] = value; OnPropertyChanged("WBFKUGEW", value); } } //lENGth 0
        public double WBFKDIFFLG { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WBFKDIFFLG"].ToString()); } set { if (dwMaster == null) return; dwMaster["WBFKDIFFLG"] = value; OnPropertyChanged("WBFKDIFFLG", value); } } //lENGth 0
        public double WBFKDIFFGEW { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WBFKDIFFGEW"].ToString()); } set { if (dwMaster == null) return; dwMaster["WBFKDIFFGEW"] = value; OnPropertyChanged("WBFKDIFFGEW", value); } } //lENGth 0
        public double WBFK1ALG { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["WBFK1ALG"].ToString()); } set { if (dwMaster == null) return; dwMaster["WBFK1ALG"] = value; OnPropertyChanged("WBFK1ALG", value); } } //lENGth 0
        public string WBFKURWAKZ { get { if (dwMaster == null) return ""; return dwMaster["WBFKURWAKZ"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKURWAKZ"] = value; OnPropertyChanged("WBFKURWAKZ", value); } } //lENGth 1
        public string WBFKDFFSCHL { get { if (dwMaster == null) return ""; return dwMaster["WBFKDFFSCHL"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKDFFSCHL"] = value; OnPropertyChanged("WBFKDFFSCHL", value); } } //lENGth 3
        public string WBFKDFKSTKRS { get { if (dwMaster == null) return ""; return dwMaster["WBFKDFKSTKRS"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKDFKSTKRS"] = value; OnPropertyChanged("WBFKDFKSTKRS", value); } } //lENGth 2
        public string WBFKDFKST { get { if (dwMaster == null) return ""; return dwMaster["WBFKDFKST"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKDFKST"] = value; OnPropertyChanged("WBFKDFKST", value); } } //lENGth 4
        public string WBFKDFKUNDNR { get { if (dwMaster == null) return ""; return dwMaster["WBFKDFKUNDNR"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKDFKUNDNR"] = value; OnPropertyChanged("WBFKDFKUNDNR", value); } } //lENGth 8
        public string WBFKDFLIEFNR { get { if (dwMaster == null) return ""; return dwMaster["WBFKDFLIEFNR"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKDFLIEFNR"] = value; OnPropertyChanged("WBFKDFLIEFNR", value); } } //lENGth 8
        public string WBFKFILLER { get { if (dwMaster == null) return ""; return dwMaster["WBFKFILLER"].ToString(); } set { if (dwMaster == null) return; dwMaster["WBFKFILLER"] = value; OnPropertyChanged("WBFKFILLER", value); } } //lENGth 40

    }
}
